using System;
using System.Collections.Generic;

namespace FastMapper.Core
{
    public class TypeMapDefinition
    {
        private readonly TypeInfo _sourceType;
        private readonly TypeInfo _destinationType;
        private readonly IList<PropertyMapDefinition> _propertyMapDefinitions;


        public TypeMapDefinition(TypeInfo sourceType, TypeInfo destinationType)
        {
            _propertyMapDefinitions = new List<PropertyMapDefinition>();
            _sourceType = sourceType;
            _destinationType = destinationType;
        }

        public Type SourceType
        {
            get { return _sourceType.Type; }
        }

        public Type DestinationType
        {
            get { return _destinationType.Type; }
        }

        public IEnumerable<PropertyMapDefinition> GetPropertyMapDefinitions()
        {
            return _propertyMapDefinitions;
        }

        public void AddPropertyMapDefinition(PropertyMapDefinition propertyMapDefinition)
        {
            _propertyMapDefinitions.Add(propertyMapDefinition);
        }

    }
}